package com.gwz.sys.mapper;

import java.util.List;

import com.gwz.sys.domain.Role;

public interface RoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);
    
    List<Role> queryAllRole(Role role);
    
    //删除角色和权限的老关系
	void deleteRolePermissionByRoleId(Integer rid);

	//保存角色和权限的新关系
	void saveRolePermission(Integer rid, Integer pid);
	
	List<Role> queryRoleByUserId(Integer id);
}